// Copyright 2012 Dorival de Moraes Pedroso. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build ignore

package main

import (
    "fmt"
    "code.google.com/p/gemlab"
)

func main() {
    rg := gemlab.Uregions{
        []int{-1},     // region tags
        []float64{-1}, // region max_vols
        []int{         // facets' tags
            -1, -2, -3, -4, -5, -6, 0,0,0,0,0,0,
        },
        [][]float64{    // region indicators
            {0.2, 0.2, 0.2}, // x,y,z-values
        },
        [][]float64{ // holes
            {0.7, 0.7, 0.7}, // x,y,z-values
        },
        [][]float64{ // points
            {0.0, 0.0, 0.0},
            {1.5, 0.0, 0.0},
            {1.5, 1.5, 0.0},
            {0.0, 1.5, 0.0},
            {0.0, 0.0, 1.5},
            {1.5, 0.0, 1.5},
            {1.5, 1.5, 1.5},
            {0.0, 1.5, 1.5},
            {0.5, 0.5, 0.5},
            {1.0, 0.5, 0.5},
            {1.0, 1.0, 0.5},
            {0.5, 1.0, 0.5},
            {0.5, 0.5, 1.0},
            {1.0, 0.5, 1.0},
            {1.0, 1.0, 1.0},
            {0.5, 1.0, 1.0},
        },
        [][]int{ // facets
            { 0, 3, 7, 4},
            { 1, 2, 6, 5},
            { 0, 1, 5, 4},
            { 2, 3, 7, 6},
            { 0, 1, 2, 3},
            { 4, 5, 6, 7},
            { 8,11,15,12},
            { 9,10,14,13},
            { 8, 9,13,12},
            {10,11,15,14},
            { 8, 9,10,11},
            {12,13,14,15},
        },
    }
    le := gemlab.Lregions{
        []int{-4}, // rtags
        []int{-5}, // jtags
        []int{ 1}, // quads
        [][]float64{ // points
            {0.0, 1.0, 0.0}, // x,y,z-values
            {1.5, 1.5, 1.5},
        },
        [][]int{ // connectivity
            {0, 1},
        },
        [][]int{ // boundary tags
            {-6, -66}, // left, right
        },
    }
    quad := false
    gmax := -1.0
    err  := gemlab.UmeshGen("t_umesh03", quad, gmax, &rg, &le)
    if err != nil {
        fmt.Printf("%v\n", err.Error())
    }
}
